'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.bulkInsert('file', [
      {
        file_category: 'quality_inspection',
        file_url: 'https://via.placeholder.com/400x300/007AFF/FFFFFF?text=质检单1',
        file_name: 'quality_inspection_001.jpg',
        file_origin_name: '质检单图片1.jpg',
        file_size: '1024000',
        file_type: 'image/jpeg',
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      },
      {
        file_category: 'quality_inspection',
        file_url: 'https://via.placeholder.com/400x300/FF9500/FFFFFF?text=质检单2',
        file_name: 'quality_inspection_002.jpg',
        file_origin_name: '质检单图片2.jpg',
        file_size: '856000',
        file_type: 'image/jpeg',
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      },
      {
        file_category: 'avatar',
        file_url: 'https://via.placeholder.com/100x100/52C41A/FFFFFF?text=Avatar',
        file_name: 'avatar_001.jpg',
        file_origin_name: '用户头像.jpg',
        file_size: '256000',
        file_type: 'image/jpeg',
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      }
    ]);
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete('file', null, {});
  }
};
